/**
 * Copyright (c) 2015 云智盛世
 * Created with AnsjDemo.
 */
package com.hankcs.nlp.lex;

import org.ansj.domain.Term;
import org.ansj.splitWord.analysis.BaseAnalysis;
import org.ansj.splitWord.analysis.IndexAnalysis;
import org.ansj.splitWord.analysis.NlpAnalysis;
import org.ansj.splitWord.analysis.ToAnalysis;

import java.util.List;

/**
 * Class description
 *
 * @author GanJc on 2015/9/18
 */
public class AnsjDemo {
    public static void main(String[] args) {
        String str = "我被你深深的喜欢着" ;
        String str2 = "让战士们过一个欢乐祥和的新春佳节。";
        String str3 = "洁面仪配合洁面深层清洁毛孔 清洁鼻孔面膜碎觉使劲挤才能出一点点皱纹 脸颊毛孔修复的看不见啦 " +
                "草莓鼻历史遗留问题没辙 脸和脖子差不多颜色的皮肤才是健康的 " +
                "长期使用安全健康的比同龄人显小五到十岁 28岁的妹子看看你们的鱼尾纹";
        String str4 = "主副食品";
        String str5 = "上海虹桥机场南路";
//        System.out.println(ToAnalysis.parse(str));
//        System.out.println(ToAnalysis.parse(str2));
//        System.out.println(ToAnalysis.parse(str3));
//
//        System.out.println(BaseAnalysis.parse(str));
//        System.out.println(BaseAnalysis.parse(str2));
//        System.out.println(BaseAnalysis.parse(str3));

//        System.out.println(NlpAnalysis.parse(str));
//        System.out.println(NlpAnalysis.parse(str2));
//        System.out.println(NlpAnalysis.parse(str3));

        System.out.println(IndexAnalysis.parse(str));
        System.out.println(IndexAnalysis.parse(str2));
        System.out.println(IndexAnalysis.parse(str3));
        System.out.println(IndexAnalysis.parse(str4));
        List<Term> parse = IndexAnalysis.parse(str5);
        System.out.println(parse);
        for (Term term : parse) {
            System.out.println(term.getName());
        }


    }
}
